package com.wangshidai.t3;

import com.wangshidai.t2.HttpMessageUtil;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class ClientDemo {

    public static void main(String[] args) {
        try {
            Socket socket=new Socket("127.0.0.1",9999);
            System.out.println("服务器连接成功");
            Scanner sn=new Scanner(System.in);
            System.out.println("请输入消息:");
            String message = sn.next();
            HttpMessageUtil.sendMessage(socket,message);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

}
